{% extends "base.html" %}


{% block body_page %}
<script type="text/javascript">
var d=new Date()
$(document).ready(function(e) {
    $('#get').change(function() {
        
		if($('#get option:selected').attr('dr') == '1'){
			$('#checkbox').attr("checked", true);
		}else{
			$('#checkbox').attr("checked", false);
		}
		
		$.get("getprojectdeploy/?s=" + $(this).find(':selected').val() + "&t=" + d.getTime(), function(result) {
			$("#box").html(result);
		});
	})
});
</script>
<div class="list">
    <div class="line">
      <form id="form1" name="form1" method="post" action="">
        <p>
          <label for="select2"></label>
          部署工作
            <p>
             <select name="s" id="get">
                <option>选择项目</option>
                {% for pro in pros %}
                     <!--<option value="{{escape(str(pro.id))}}">{{escape(pro.project)}}</option>-->
                     <option value="{{escape(str(pro.project))}}" dr="{{escape(str(pro.default_reboot))}}">{{escape(pro.project)}}</option>
                {% end %}
              </select>
              <!--
              <input name="checkbox" type="checkbox" id="checkbox" checked/>  
              是否重启服务-->
              <label>
                  <input name="do" type="radio" id="deploy_rollback_0" value="deploy" checked>
              部署</label>
              <label>
              <input type="radio" name="do" value="rollback" id="deploy_rollback_1">
              回退</label>
              <input type="submit" name="button2" id="button2" value="提交" />
              <!-- package history -->
             <div id="box">
             </div>
          </p>
        </p>
      </form>
    </div>
  </div>
{% end %}
